/*\*\*
 
 .---=||||[ B L O O D Y ]|||||\*\*----------....
 |                                                              |
 |    THE  M O S T   B L O O D Y  GAME EVER!                    |
 |                                                              |
 |    bloody harvest is coming... soon,                         |
 |                                              heil Satan!     |
 !                                                              !
 .                                                              ,
  ~~~~-------------\*\*-~




 Name-Space: {core, logic, editor}
 Module: {draw, coll, scgr, ...}
 Class: <name of class>
 Last modification:  <author>, <time>

 TODO:
 <-------- todo #1 ---------->
 <-------- todo #2 ---------->
 <-------- todo #3 ---------->
        ............
 <-------- todo #n ---------->

 FIX:
 <-------- fix #1 ----------->
 <-------- fix #1 ----------->
         ..........
 <-------- fix #n ----------->




 
 
 \*\**/
#ifndef __core_Timer_Header_File__
#define __core_Timer_Header_File__

#include "common.h"

namespace core
{

	/**
	 * Class providing access to system time.
	 */
	class Timer
	{
	public:
		/// Get current time in seconds
		double getTime() const;

		/// Pause engine
		void pause();

		/// Unpause engine
		void unpause();

		static Timer& instance();

		static double time(){
			Timer& t = instance();
			return t.getTime();
		}

	private:
		double pauseDelta;
		double pauseStart;
		bool isPaused;

		static Timer* inst;

		Timer();
	};
}

#endif //__core_Timer_Header_File__


